package main

import "fmt"

//golang中基本数据类型的转换
func main() {
	var i int32 = 100
	//希望将i转成100
	var n1 float32 = float32(i)
	fmt.Printf("i=%v n1=%v \n", i, n1)
	fmt.Printf("i type is %T \n", i)
	//在转换中，将int64转换位int8.会出现溢出情况
	var num1 int64 = 9999999
	var num2 int8 = int8(num1)
	fmt.Println("num2=", num2)
}
